<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="com.cn.Mapper.userMapper.UserMapper" %>
<%@ page import="com.cn.util.SqlsesstionUtil" %>
<%@ page import="com.cn.entity.user.User" %>
<%@ page import="java.util.List" %>
<%@ page import="com.cn.Mapper.goodsMapper.GoodsHotsMapper" %>
<%@ page import="com.cn.entity.goods.Goods_hots" %><%--
  Created by IntelliJ IDEA.
  User: yujiajing
  Date: 2022/10/3
  Time: 14:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>热度表</title>
    <%--  引入jQuery包  --%>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>

    <!-- 引入layui css -->
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" />

    <!-- 引入layui js -->
    <script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>

</head>

<body>


<%
    SqlSession sqlSession = SqlsesstionUtil.getSqlSession();
    GoodsHotsMapper hotsMapper=sqlSession.getMapper(GoodsHotsMapper.class);
    List<Goods_hots> hotsList = hotsMapper.showHots();
%>
<table id="UserTable" class="layui-table"  >

    <tr>
        <td>商品id</td>
        <td>商品名称</td>
        <td>热度值</td>
    </tr>

    <%for (Goods_hots goods_hots:hotsList){%>
    <%--  --%>

    <tr >
        <%--    --%>
        <td><%=goods_hots.getGoods_id()%></td>
        <td><%=goods_hots.getGoods_name()%></td>
        <td><%=goods_hots.getGoods_hot()%></td>


        <%}%>
    </tr >
</table>
</body>
</html>
